package com.yugu.park.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yugu.park.business.entity.SysFileEntity;
import com.yugu.park.business.mapper.SysFileMapper;
import com.yugu.park.business.service.SysFileService;
import com.yugu.util.SearchPage;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;

import org.springframework.transaction.annotation.Transactional;
import com.github.pagehelper.PageInfo;

import com.github.pagehelper.PageHelper;

import java.util.List;

@Service
@Transactional
public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFileEntity> implements SysFileService {
      @Resource
	  private SysFileMapper mapper;
	@Override
	public PageInfo<SysFileEntity> page(SearchPage<SysFileEntity> search) {
		PageHelper.startPage(search.getPageNum(),search.getPageSize());
        List<SysFileEntity> list = mapper.page(search.getSearch());
        return PageInfo.of(list);
	}

}
